{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load staticfiles %}


{% block head_title %}Welcome | {{ block.super }}{% endblock %}

<style>
{% block style %}
.navbar-static-top {
	margin-bottom: 0px !important;
}

.jumbotron {
	background-color:#5ACDFF;
	color: #000;
	{% if featured_image.make_image_background %} 
	background-image: url("{{ featured_image.image.url }}");
	background-repeat: no-repeat;
	background-color: #000;
	background-size: cover;
	background-position-y: -272px;
	{% endif %}
}

{% endblock %}
</style>


     
{% block jumbotron %}

	{% if featured_image %}
		<div class="jumbotron" >
		 <div class="container">
			<div class="row">
				<div class='col-sm-12 text-center {% if featured_image.text_right %} pull-right {% endif %}'>
				<h1>{{ featured_image.product.title }}</h1>
				<p>{{ featured_image.product.description }}</p>
				<p>
				<a class="btn btn-lg btn-primary" href="{{ featured_image.product.get_absolute_url }}" role="button">More Details </a>
				</p>
				</div>
				{% if not featured_image.make_image_background %} 
				<div class='col-sm-6' >
					<img src="{{ featured_image.image.url }}" class='img-responsive' />
		 		</div>
		 		{% endif %}
				</div>
			</div>
		 </div>


	{% else %}
	<div class="jumbotron">
	 <div class="container">
		<div class="row">
			<div class='col-sm-6'>
			<h1>Try Django 1.8</h1>
			<p>The MVP Landing project is designed to get your project started. The goal is to help you launch as soon as possible with the least amount of investment using time or money. Join Us today.</p>
			<p>
			<a class="btn btn-lg btn-primary" href="" role="button">Join Us &raquo;</a>
			</p>
			</div>
			<div class='col-sm-6' >
				<iframe width="560" height="315" src="https://www.youtube.com/embed/2uLYO1LUf6Q" frameborder="0" allowfullscreen></iframe>

	 		</div>
			</div>
		</div>
	 </div>

	 {% endif %}


{% endblock %}




{% block content %}

<div class='row'>
<h3>Recommended Products</h3>
{% include "products/products.html" with object_list=products col_class_set="col-sm-2" %}

</div>

<div class='row'>
<h3>Featured Products</h3>
{% include "products/products.html" with object_list=products2 %}

</div>


<!-- 
 {% if request.user.is_authenticated %}
<h1>You are logged in!</h1>

	{% if queryset %}
	<h2>Welcome Staff</h2>
	<table class='table'>
	{% for instance in queryset %}
		<tr><td>{{ forloop.counter }}</td><td>{{ instance.email }}</td><td>{{ instance.full_name }}</td><td>{{ instance.timestamp|timesince }} ago</td></tr>
		{% if instance.email == "abc@gmail.edu" %}
		<tr><td>is equal</td></tr>
		{% endif %}
	{% endfor %}
	</table>

	{% endif %}

 {% else %}
<div class="row">

  <div class="col-sm-3 pull-right">
  	
			<p class='lead text-align-center'>{{ title }}</p>

			<form method='POST' action=''>{% csrf_token %}
			{{ form|crispy }}

			<input class='btn btn-primary' type='submit' value='Sign Up' />

			</form>
	</div>

	<div class='col-sm-3'>
<p class='lead text-align-center'>Django &amp; Bootstrap</p>
			<img src='{% static "img/marketing1.jpg" %}' class='img-responsive' />
</div>

<div class='col-sm-3'>
<p class='lead text-align-center'>Created for Starters 
<br/>
<span class='fa-stack fa-lg fa-5x'>
<i class='fa fa-comment-o fa-stack-2x'></i>
<i style='color:yellow;' class="fa fa-bolt fa-stack-1x"></i>

</span>
</p>

</div>

<div class='col-sm-3'>
<p class='lead text-align-center'>Always Open Source <br/><br/>

<span class="fa-stack fa-lg fa-5x">
<i class="fa fa-circle-o-notch fa-stack-2x"></i>

  <i class="fa fa-github fa-stack-1x"></i>
</span>
</p>


</div>


</div>
{% endif %} -->

{% endblock %}